import GraphBack from '../../src'
const canvas = document.createElement('canvas')
canvas.style.position = 'fixed'
canvas.style.width = canvas.style.height = '100%'
canvas.style.top = canvas.style.left = '0'
document.body.appendChild(canvas)

// 场景
const scene = new GraphBack.Scene(canvas, { color: 'green' })

const rect = new GraphBack.Rect({ x: 300, y: 300, width: 200 })
scene.add(rect)

const circle = new GraphBack.Circle({ color: 'red', x: 400, y: 350, direction: 'inherit' })
scene.add(circle)

const text = new GraphBack.Text({
  text: 'TEXT文本测试test',
  x: 400,
  y: 350,
  color: 'blue',
  fill: true,
  font: '40px serif'
})
scene.add(text)

scene.clearRect(400, 350, 20, 20)
scene.animate()
